package com.suray.rgv.data;

import com.suray.basic.wcs.utils.Time;
import com.suray.rgv.util.ErrorInfo;
import com.suray.type.*;
import lombok.Data;

import java.util.List;

/**
 * 两栖车数据推送前端
 */
@Data
public class Rgv60InfoData {

    //当前站点
    private String currentStation;

    //定位状态
    private SeerRobotPositionStatus relocStatus;

    //机器人当前实时站点
    private String robotCurrentStation;

    //上一个点的站点
    private String lastStation;

    //序列号
    private String serialNum;

    //在线
    private boolean onLine;

    private boolean routeOnLine;

    private boolean configOnLine;

    private boolean robotStateOnLine;

    private boolean controlOnLine;

    //有小车控制权
    private boolean hasRgvAuthor;

    //小车状态
    private Rgv60Status rgvStatus;

    //小车实际状态
    private Rgv60Status rgvActStatus;

    //故障
    private List<ErrorInfo> errorInfos;

    //最严重故障
    private String highestError;

    //托盘状态
    private Rgv60PalletStatus palletStatus;

    //托盘是否启用
    private Boolean palletEnable;

    //托盘动作异常码
    private Integer palletActionErrorCode;

    //小车是否载货
    private Boolean hasCargo;

    //x坐标,距离原点的距离
    private Double x;

    //y坐标,距离原点的距离
    private Double y;

    //angle坐标
    private Float angle;

    //位置可信度0-1
    private Double confidence;

    //障碍物阻挡
    private Boolean blocked;

    //阻挡原因
    private Rgv60BlockReason blockReason;

    //电池电量0-1
    private Float batSoc;

    //电池温度,℃%
    private Float batTemp;

    //电池电压,V
    private Float batVolt;

    //电池电流,A
    private Float batCur;

    //是否连接充电桩
    private Boolean autoCharge;

    //充电中
    private Boolean charging;

    //任务状态, 导航状态
    private Rgv60TaskStatus taskStatus;

    //当前任务的终点，目的位置
    private String targetStation;

    //任务类型
    private Rgv60TaskType taskType;

    //加载地图状态
    private Rgv60LoadMapStatus loadMapStatus;

    //运行模式
    private Rgv60Mode mode;

    //运行模式
    private Rgv60RollerMode rollerMode;

    //当前地图名字
    private String currentMap;

    //当前地图MD5
    private String currentMapMD5;

    //当前连接 Wifi 的信号强度，0-100 百分比（机器人需要支持连接 Wifi 并且已经连接，否则为0）
    private Integer wifiStrength;

    //机器人名字
    private String robotName;

    //小车存储的地图
    private List<String> maps;

    //累计里程,km
    private Double odo;

    //今日累计里程,m
    private Double todayOdo;

    //累计运行时间
    private Time runningTime;

    //本次运行时间
    private Time curRunningTime;

    //控制器电压
    private Float controlVolt;

    //控制器温度
    private Float controlTemp;

    //控制器湿度
    private Float controlWet;

    //电池循环次数
    private int chargeNum;

    //支持最大充电电压
    private Float permitMaxChgVolt;

    //支持最大充电电流
    private Float permitMaxChgCur;

    //障碍物x坐标
    private Float blockX;

    //障碍物y坐标
    private Float blockY;

    //急停
    private Boolean driveEmc;

    //抱闸
    private Boolean holdBrake;

    //底盘是否静止
    private Boolean isStop;

    //目标点x，y，角度
    private Float targetX;
    private Float targetY;
    private Float targetR;

    //机器人备注
    private String robotNote;

    //IO输入
    private Boolean[] DI;
    //IO输出
    private Boolean[] DO;

    public Rgv60InfoData() {
        DI = new Boolean[9];
        DO = new Boolean[9];
    }
}
